﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site2.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<FindPharmacies.Model.Pharmacy>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	EmergencyMannheim
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <link href="../../Scripts/jquery-ui-1.8.10.custom.css" rel="stylesheet" type="text/css" />
    <script src="../../Scripts/jquery-1.4.1.min.js" type="text/javascript"></script>
    <script src="../../Scripts/jquery-1.4.1.js" type="text/javascript"></script>
    <script src="../../Scripts/jquery-ui-1.8.10.custom.min.js" type="text/javascript"></script>
    
    
    <link href="../../Content/style.css" rel="stylesheet" type="text/css" />
     <script type="text/javascript" src="http://ecn.dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6.3"></script>
      
      <script type="text/javascript">

          jQuery(document).ready(function () {
              // accordion
              jQuery("#accordion3").accordion({
                  header: "h4",
                  active: 2,
                  collapsible: true,
                  fillSpace: true
                  //autoHeight: false,
                  //clearStyle: true,
                  //navigation: false,
              });
          });
          jQuery(document).ready(function () {
              jQuery("#accordion3Resizer").resizable({
                  minHeight: 140,
                  resize: function () {
                      jQuery("#accordion3").accordion("resize");
                  }
              });
          });

          jQuery(document).ready(function () {
              LoadMap();
              LoadPharmacies();
          });

          function LoadPharmacies() {
              jQuery.getJSON("/pharmacy/EmergencyMannheim", function (json) {

                  jQuery.each(json, function (i, pharmacy) {
                      LoadPoint(pharmacy);

                      jQuery('#pharmacyList').append($('<li/>')
                      .attr("class", "pharmacyItem")
                      .append(pharmacy.Name)
                      .append($('<br>'))
                      .append(pharmacy.Street)
                      .append($("<a> </a>"))
                      .append(pharmacy.No)
                      .append($('<br>')));
//                      .append(pharmacy.Zip)
//                      .append($("<a> </a>"))
//                      .append(pharmacy.City)
//                      .append($('<br/>')));

                  });

              });
          }

          var map;
          function LoadPoint(pharmacy) {
              var point = new VELatLong(pharmacy.Latitude, pharmacy.Longitude);
              var pin = new VEShape(VEShapeType.Pushpin, point);
              pin.SetTitle(pharmacy.Name);
              pin.SetDescription(pharmacy.Street + "<a> </a>" + pharmacy.No + "<br/>"
                + pharmacy.Zip + "<a> </a>" + pharmacy.City + "<br> <br/>"
                + "<strong>Opening Hours: </strong>" + "<br/>" + pharmacy.OpeningHours
                + "<br> <br/>" + "<strong>Emergency Service: </strong>" + "<br/>"
                + pharmacy.EmergencyTimes + "<br> <br/>" + "<strong>Kontakt: </strong>"
                + "<br/>" + "Phone: " + " <br/> " + pharmacy.Phone + " <br/> " + "Email: "
                + "<br/>" + pharmacy.Email + "<br/>" + "Website: " + " <br/> " + pharmacy.Website);

              //Custom Pin
              var icon = "<img src='../../Content/ApothekenLogo.png' />";
              pin.SetCustomIcon(icon);



              map.AddShape(pin);
          }

          function LoadMap() {
              map = new VEMap('theMap');
              map.LoadMap(new VELatLong(49.483996, 8.475237, 0, VEAltitudeMode.RelativeToGround), 12, false);
          }


      </script>
	
<div id="wrapper">
<div class="btm">
	<div id="page">
		<div id="content">
			<div class="post">
				<h1 class="title">Emergency Services in Mannheim</h1>
				<div class="entry">
					<div id="theMap" style="position:relative;width:440px;height:400px;"></div>
				</div>
			</div>
			<div class="post">
				<h2 class="title">Lorem ipsum sed aliquam</h2>
				<div class="entry">
					<p>Sed lacus. Donec lectus. Nullam pretium nibh ut turpis. Nam bibendum. In nulla tortor, elementum vel, tempor at, varius non, purus. Mauris vitae nisl nec metus placerat consectetuer. Donec ipsum. Proin imperdiet est. Phasellus <a href="#">dapibus semper urna</a>. Pellentesque ornare, orci in consectetuer hendrerit, urna elit eleifend nunc, ut consectetuer nisl felis ac diam. Etiam non felis. Donec ut ante. In id eros. Suspendisse lacus turpis, cursus egestas at sem. Phasellus pellentesque. Mauris quam enim, molestie in, rhoncus ut, lobortis a, est.</p>
					<p>Praesent ac lectus. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Vivamus augue. Fusce eget tellus ultrices ligula volutpat adipiscing. Aenean ligula lectus, vehicula in, dictum a, fermentum nec, felis. Nunc ac turpis in leo posuere imperdiet.</p>
				</div>
				<p class="meta">Posted by <a>Someone</a> on March 8, 2008
					&nbsp;&bull;&nbsp; <a href="#" class="comments">Comments (64)</a> &nbsp;&bull;&nbsp; <a href="#" class="permalink">Full article</a></p>
			</div>
			<%--<div class="post">
				<h2 class="title"><a href="#">Phasellus pellentesque turpis </a></h2>
				<div class="entry">
					<p>Sed lacus. Donec lectus. Nullam pretium nibh ut turpis. Nam bibendum. In nulla tortor, elementum vel, tempor at, varius non, purus. Mauris vitae nisl nec metus placerat consectetuer. Donec ipsum. Proin imperdiet est. Pellentesque ornare, orci in consectetuer hendrerit, urna elit eleifend nunc, ut consectetuer nisl felis ac diam. Etiam non felis. Donec ut ante. In id eros. Suspendisse lacus turpis, cursus egestas at sem. Phasellus pellentesque. Mauris quam enim molestie  rhoncus lobortis a, est.</p>
				</div>
				<p class="meta">Posted by <a href="#">Someone</a> on March 8, 2008
					&nbsp;&bull;&nbsp; <a href="#" class="comments">Comments (64)</a> &nbsp;&bull;&nbsp; <a href="#" class="permalink">Full article</a></p>
			</div>--%>
		</div>
		<!-- end #content -->
		<div id="sidebar">
			<ul>
				<li>
					<h2>Aliquam tempus</h2>
					<p>Mauris vitae nisl nec metus placerat perdiet est. Phasellus dapibus semper urna ornare consectetuer hendrerit.</p>
				</li>
				<li>
					<div id="accordion3">
			                    <div>
                                <h4><a>Pharmacies</a></h4>
                                    <div>
                                    <%: Html.ActionLink("Heidelberg", "Heidelberg", "Pharmacy")%><br /><br />
                                    <%: Html.ActionLink("Mannheim", "Mannheim", "Pharmacy")%>
                                    </div>
			                    </div>
                                <div>
				                    <h4><a>Emergency Services</a></h4>
				                    <div> 
                                    <%:Html.ActionLink("Heidelberg", "EmergencyHeidelberg", "Pharmacy")%><br /><br />
                                    <%:Html.ActionLink("Mannheim", "EmergencyMannheim", "Pharmacy")%>
                                    </div>
			                    </div>
			                    <div>
				                    <h4><a>Emergency Services Mannheim</a></h4>
                                    <div id="pharmacyList" style="height:390px;overflow:auto"></div>
			                    </div>
			                    <div>
				                    <h4><a>Hotline</a></h4>
				                    <div>Nam dui erat, auctor a, dignissim quis.</div>
			                    </div>
		            </div>
				</li>
			<%--	<li>
					<h2>Blogroll</h2>
					<ul>
						<li><a href="#">Phasellus Pellentesque</a><span>Lorem Ipsum Dolor Sit Amit</span> </li>
						<li><a href="#">Consectetuer Adipiscing</a><span>Lorem Ipsum Dolor Sit Amit</span> </li>
						<li><a href="#">Urna Congue Rutrum</a><span>Lorem Ipsum Dolor Sit Amit</span> </li>
						<li><a href="#">Phasellus Pellentesque</a><span>Lorem Ipsum Dolor Sit Amit</span> </li>
						<li><a href="#">Urna Congue Rutrum</a><span>Lorem Ipsum Dolor Sit Amit</span> </li>
					</ul>
				</li>
				<li>
					<h2>Archives</h2>
					<ul>
						<li><a href="#">December 2007</a>&nbsp;(29)<span>Lorem Ipsum Dolor Sit Amit</span></li>
						<li><a href="#">November 2007</a>&nbsp;(30)<span>Lorem Ipsum Dolor Sit Amit</span></li>
						<li><a href="#">October 2007</a>&nbsp;(31)<span>Lorem Ipsum Dolor Sit Amit</span></li>
					</ul>
				</li>--%>
			</ul>
		</div>
		<!-- end #sidebar -->
		<div style="clear: both;">&nbsp;</div>
	    </div>
	<!-- end #page -->
</div>
</div>
	<div id="footer">
		
	</div>
	<!-- end #footer -->



</asp:Content>

